<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
	function showdata(t)
	{
		if($("#ids"+t).is(":hidden")){
			$("#ids"+t).show();
		}else{
			$("#ids"+t).hide();
		}
	
	}
	
function ouputcsvnew()
{
	$("#if_csv").val(1);
	$("#search").submit();
}

</script>
<title>日收入报表</title>
<body class="withvernav">
<style type="text/css">
.stdtable tbody tr td{padding:3px 5px;}
</style>
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">日收入报表<span class="pagedesc" style="font-size:14px;">(只统计直发订单)</span></h1>
      <span class="pagedesc"></span>
      <div class="menulist">
        <ul class="profile_summary">
          <li class="current"></li>
        </ul>
      </div>
    </div>
    <!--pageheader-->
      <form class="stdform stdform2" method="get" action="/report/incomeForDay">
      <div class="tableoptions">
      开始时间：
       <input type="text"  name="starttime" id="starttime" value="{{$starttime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
                  -
                  <input type="text"  name="endtime" value="{{$endtime}}" id="endtime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
       <span id="search_list">{{$shopname|getstr:48:0}}</span>
       <input name="shopname" id="shopname" type="hidden" value="{{$shopname}}" />
       <input type="hidden" name="op" value="reportDay">
       <span id="choose_shop_btn" style="border:1px solid #ccc;padding:6px 5px 7px;border-radius:3px;cursor:pointer;" onClick="getShopList()">选择店铺 <img src="/fuman/images/search_down.png" width="14" height="21" align="absmiddle" style="margin-bottom:-4px;"></span>
        <button class="btn btn_orange btn_search radius50">Search</button>
         &nbsp;
        {{if $list[0] neq  ''}}
        <span class="page" style="background-color#fff;border:none;"><a href="javascript:exportExl();">导出结果到Excel</a></span>
        {{/if}}
         </div>
    </form>
    <div id="contentwrapper" class="contentwrapper">
      <div id="basicform" class="subcontent">
        <form class="stdform stdform2"  id="theFrom" method="post" action="/oversea/savecompare">
        <div class="x_content" style="overflow-x:auto;">
        <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
             <tr valign="top" style="height:20px">
  <td rowspan="2" style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">时间</td>
  <td colspan="3" style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">收入</td>
  <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">支出</td>
  <td rowspan="2" style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">商品销量</td>
  <td rowspan="2" style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">订单量</td>
</tr>
<tr valign="top" style="height:20px">
  <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">交易金额</td>
  <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">实收运费</td>
  <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">小计</td>
  <td style=" vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000; text-align: center;">商品成本</td>
</tr>
            </thead>
            <tbody>
            
           {{foreach from=$list item=res key=key}}
            <tr>
              <td class="head1" align="center">{{$res.orderDate}}</td>
              <td class="head0" align="center">{{$res.orderAmount}}</td>
              <td class="head1" align="center">{{$res.shipping_fee}}</td>
              <td class="head0" align="center">{{$res.subtotal}}</td>
              <td class="head1" align="center">{{$res.cosprice}}</td>
              <td class="head0" align="center">{{$res.goodsnNum}}</td>
               <td class="head1" align="center">{{$res.orderNum}}</td>
               </tr>
            {{/foreach}}
            <tr>
            <td class="head1" align="center"><B>合计</B></td>
            <td class="head0" align="center"><font color="#FF0000"><B>{{$allorderAmount}}</B></font></td>
            <td class="head1" align="center"><font color="#FF0000"><B>{{$allshipping_fee}}</B></font></td>
            <td class="head0" align="center"><font color="#FF0000"><B>{{$allsubtotal}}</B></font></td>
            <td class="head1" align="center"><font color="#FF0000"><B>{{$allcosprice}}</B></font></td>
            <td class="head0" align="center"><font color="#FF0000"><B>{{$allnum}}</B></font></td>
            <td class="head1" align="center"><font color="#FF0000"><B>{{$allorderNum}}</B></font></td>
            </tr>
            </tbody>
            
          </table>
          
             
         
         </div>
        </form>
        <br />
      </div>
      <!--subcontent--> 
      
      <!--subcontent--> 
      
    </div>
    <!--contentwrapper--> 
  </div>
  <!-- centercontent --> 
</div>
{{if $list[0] neq ''}}<div align="center"><div id="chartContainer">收入与支出图表</div> <br /></div>{{/if}}
<div style="position:absolute;z-index:999;top:105px;border:1px solid #666;left:220px;width:870px;background:#f5f5f5;padding:6px 10px;height:450px;margin-bottom:40px;display:none;" id="ajax_box">
<div style="padding-top:8px;padding-left:12px;height:28px;"><h4 style="float:left">选择要搜索的店铺</h4><span style="float:right">
  <input type="button" name="button" id="button" onClick="setShopInfo()" value="确定选择">&nbsp;&nbsp;
  <input type="button" value="关闭弹层" onClick="closeShowBox()">
</span></div>
<hr>
<div id="shop_box" style="height:400px;overflow:auto"></div>
</div>
<script type="text/javascript" src="/fuman/js/report.js"></script>
<script type="text/javascript" src="/fuman/js/charts/fusioncharts.charts.js"></script>
<script type="text/javascript" src="/fuman/js/charts/fusioncharts.js"></script>
<script type="text/ecmascript">
FusionCharts.ready(function(){
var myChart = new FusionCharts({
      "type": "mscolumn2d",
      "renderAt": "chartContainer",
      "width": "90%",
      "height": "310",
      "dataFormat": "xml",
      "dataSource": "<chart caption='收入与支出图表' showValues='0' subcaption='' xaxisname='日期' yaxisname='交易金额' numberprefix='￥' bgalpha='0' borderalpha='20' canvasborderalpha='0' formatNumberScale='0' theme='fint' useplotgradientcolor='0' plotborderalpha='10' placevaluesinside='1' rotatevalues='1' valuefontcolor='#ffffff' captionpadding='20' showaxislines='1' axislinealpha='25' divlinealpha='10' palettecolors='#0075c2,#1aaf5d'><categories>{{foreach from=$list item=res key=key}}<category label='{{$res.orderDate|getstr:5:5}}' />{{/foreach}}</categories><dataset seriesname='收入'>{{foreach from=$list item=res key=key}}<set value='{{$res.subtotal|toFloatVal}}' />{{/foreach}}</dataset><dataset seriesname='支出'>{{foreach from=$list item=res key=key}}<set value='{{$res.subzhic|toFloatVal}}' />{{/foreach}}</dataset></chart>"
    });
  myChart.render();
})
</script>
</body>
</html>